package main

import (
    "big"
    "flag"
    "fmt"
    "strconv"
    factorial "./Go/commonfact"
)


/*
   Calculate the factorial of 'x'.
*/
func fact(x *big.Int) *big.Int {
    return factorial.FactRange(big.NewInt(1), x)
}


func main() {
    flag.Parse()

    num, err := strconv.Atoi64(flag.Arg(0))

    if err != nil {
        panic("Crap")
    }

    fmt.Println(fact(big.NewInt(num)))
}
